package cn.ibizlab.todo.core.pms.client;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.todo.core.pms.domain.ProjectTeam;
import cn.ibizlab.todo.core.pms.filter.ProjectTeamSearchContext;
import org.springframework.cloud.openfeign.FeignClient;

/**
 * 实体[ProjectTeam] 服务对象接口
 */
@FeignClient(value = "${ibiz.ref.service.pms-webapi:pms-webapi}", contextId = "ProjectTeam", fallback = ProjectTeamFallback.class)
public interface ProjectTeamFeignClient {

    @RequestMapping(method = RequestMethod.GET, value = "/projectteams/select")
    Page<ProjectTeam> select();


    @RequestMapping(method = RequestMethod.POST, value = "/projectteams")
    ProjectTeam create(@RequestBody ProjectTeam projectteam);

    @RequestMapping(method = RequestMethod.POST, value = "/projectteams/batch")
    Boolean createBatch(@RequestBody List<ProjectTeam> projectteams);


    @RequestMapping(method = RequestMethod.PUT, value = "/projectteams/{id}")
    ProjectTeam update(@PathVariable("id") Long id,@RequestBody ProjectTeam projectteam);

    @RequestMapping(method = RequestMethod.PUT, value = "/projectteams/batch")
    Boolean updateBatch(@RequestBody List<ProjectTeam> projectteams);


    @RequestMapping(method = RequestMethod.DELETE, value = "/projectteams/{id}")
    Boolean remove(@PathVariable("id") Long id);

    @RequestMapping(method = RequestMethod.DELETE, value = "/projectteams/batch}")
    Boolean removeBatch(@RequestBody Collection<Long> idList);


    @RequestMapping(method = RequestMethod.GET, value = "/projectteams/{id}")
    ProjectTeam get(@PathVariable("id") Long id);


    @RequestMapping(method = RequestMethod.GET, value = "/projectteams/getdraft")
    ProjectTeam getDraft();


    @RequestMapping(method = RequestMethod.POST, value = "/projectteams/checkkey")
    Boolean checkKey(@RequestBody ProjectTeam projectteam);


    @RequestMapping(method = RequestMethod.POST, value = "/projectteams/save")
    Boolean save(@RequestBody ProjectTeam projectteam);

    @RequestMapping(method = RequestMethod.POST, value = "/projectteams/savebatch")
    Boolean saveBatch(@RequestBody List<ProjectTeam> projectteams);



    @RequestMapping(method = RequestMethod.POST, value = "/projectteams/searchdefault")
    Page<ProjectTeam> searchDefault(@RequestBody ProjectTeamSearchContext context);


}
